﻿@{
    ViewBag.Title = "Configuration";
    Layout = "~/Areas/Admin/Views/Shared/_LayoutAdmin.cshtml";
}
@section Head
{
    <script src="@Url.Content("~/Areas/Admin/Scripts/Solution.Admin.SysConfiguration.js")" type="text/javascript"></script>
}
<script type="text/javascript">
    var Url = '@Url.Action("GetData")/';
    var UrlEdit = '@Url.Action("Edit")/';
    var EditAdvance = '@Url.Action("EditAdvance")/';
    $(function () {
        InitMenuID(1, 2);
        Solution.Admin.Core.InitNotif();
        Solution.Admin.SysConfiguration.CreateGrid(Url, UrlEdit, EditAdvance );

    });

    function Create() {
        Solution.Admin.SysConfiguration.Create();
    }
    function ReloadGrid() {
        Solution.Admin.SysConfiguration.ReloadGrid()
    }
    function DeleteRows() {
        Solution.Admin.SysConfiguration.DeleteRows(UrlEdit);
    }
    function DeleteRowsForever() {
        Solution.Admin.SysConfiguration.DeleteRows(UrlEdit, true);
    }
    function ShowBin() {
        Solution.Admin.SysConfiguration.ShowBin(Url, true);
    }
    function NotShowBin() {
        Solution.Admin.SysConfiguration.ShowBin(Url, false);
    }
</script>
<h1>
    <img src="@Url.Content("~/Areas/Admin/Content/Images/icon/push_pin_32x32.png")" alt="">
    Configuration management
</h1>
<div id="InitNotif">
</div>
<div class="bloc">
    @* <div class="title"> User<a href="#" class="toggle"></a></div>*@
    <div class="content">
        <div class="nvbar">
            <input type="button" id="AddNew" value="Add new" class="white" onclick="Create();"/>
            <input type="button" id="ReLoad" value="Reload" class="white" onclick="ReloadGrid();"/>
            <input type="button" id="Delete" value="Delete" class="white" onclick="DeleteRows();"/>
            <input type="button" id="DeleteForever" value="Delete forever" class="white" onclick="DeleteRowsForever();"/>
            <input type="button" id="Normal" value="Normal" class="blue" onclick="NotShowBin();"/>
            <input type="button" id="ShowBin" value="Show bin" class="white" onclick="ShowBin();"/>
        </div>
        <div class="jqgrid">
            <table id="List" class="scroll" cellpadding="0" cellspacing="0">
            </table>
            <div id="ListPager" class="scroll" style="text-align: center;">
            </div>
        </div>
    </div>
</div>
